<div class="content-byc image-content" ng-controller="vmAddVmwareCtrl">
	<div class="animated update-content" ng-class="{true:'bounceInRight',false:'bounceOutRight'}[isActive]"
	     ng-if="showDetail==1">
		<div class="wrapper-md">
			<div class="row">
				<div class="col-md-12">
					<div class="panel panel-default" style="padding:0;">
						<div class="panel-heading">
							<span class="p-l-6">新增虚机</span>
							<button class="btn btn-default pull-right" style="margin-top: -7px;" ng-click="goBack()" tabindex="0">
								<i class="fa fa-reply icon-font"></i> 返回
							</button>
						</div>

						<div class="panel-body pmb-block" style="border:none;">
							<div class="form-horizontal">
								<div class="col-md-12 margin-top-12" ng-if="showVmware==1">
									<form class="form-horizontal form-validation" name="addvmVmwareForm">
										<div class="form-group">
											<div class="col-lg-6">
												<label class="col-md-3 control-label control-label2"><span
														class="span-red">*</span>虚机名称：</label>
												<div class="col-md-9 control-input width-74">
													<input type="text" name="name" class="form-control" placeholder="虚机名称" ng-model="addData.name"
													       validator="required,name" maxlength="64">
												</div>
											</div>
											<div class="col-lg-6">
												<label class="col-md-3 control-label control-label2"><span
														class="span-red">*</span>虚机模板：</label>
												<div class="col-md-9 control-input width-74">
													<select class="form-control" name="template" ng-model="addData.templateId" validator="required" ng-change="getNetworkData()">
														<option value="">--请选择--</option>
														<option ng-repeat="row in templateList" ng-selected="row.id==addData.templateId"
														        value="{{row.id}}" ng-bind="row.name"></option>
													</select>
												</div>
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-12">
												<label class="col-md-3 control-label control-label2">计算资源：</label>
												<div class="col-md-9 control-input width-74"
												     style="width:calc(100% - 110px);border: 1px solid #ddd;margin: 0 15px;">
													<div class="search-content1">
														<div class="col-lg-12 margin-10" style="padding-left:10px;margin-top:12px;">
															<label class="col-lg-3 control-label control-label2"><span class="span-red">*</span>数据中心：</label>
															<div class="col-lg-9 control-input" style="width:calc(100% - 80px);padding:0;">
																<div class="region region-box" style="width:110px;"
																     ng-class="{true:'region-active'}[row.isVdcActive]" ng-click="chooseVdc(row)"
																     ng-repeat="row in vdcData">
																	<span class="region-txt" ng-bind="row.name" title={{row.name}}></span>
																</div>
															</div>
														</div>
														<div class="col-lg-12 margin-10" style="padding-left: 10px;">
															<label class="col-lg-3 control-label control-label2">主机集群：</label>
															<div class="col-lg-9 control-input" style="width:calc(100% - 80px);padding:0;">
																<div class="region region-box" style="width:110px;"
																     ng-class="{true:'region-active'}[row.isClusterActive]"
																     ng-click="chooseCluster(row)" ng-repeat="row in clusterData">
																	<span class="region-txt" ng-bind="row.name" title={{row.name}}></span>
																</div>
															</div>
														</div>
														<div class="col-lg-12 margin-10" style="padding-left: 10px;">
															<label class="col-lg-3 control-label control-label2"><span class="span-red">*</span>目标主机：</label>
															<div class="col-lg-9 control-input" style="width:calc(100% - 80px);padding:0;">
																<div class="region region-box" style="width:110px;"
																     ng-class="{true:'region-active'}[row.isVhostActive]" ng-click="chooseVhost(row)"
																     ng-repeat="row in vhostData">
																	<span class="region-txt" ng-bind="row.name" title={{row.name}}></span>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-12">
												<label class="col-md-3 control-label control-label2">存储资源：</label>
												<div class="col-md-9 control-input width-74"
												     style="width:calc(100% - 110px);border: 1px solid #ddd;margin: 0 15px;">
													<div class="search-content1">
														<div class="col-lg-12 margin-10" style="padding-left:10px;margin-top:12px;">
															<label class="col-lg-3 control-label control-label2"><span class="span-red">*</span>数据存储：</label>
															<div class="col-lg-9 control-input" style="width:calc(100% - 80px);padding:0;">
																<div class="region region-box" style="width:110px;"
																     ng-class="{true:'region-active'}[row.isDatastoreActive]"
																     ng-click="chooseDatastore(row)" ng-repeat="row in datastoreData">
																	<span class="region-txt" ng-bind="(row.name +'-'+ row.value + 'G')" title="{{row.name + '-' + row.value + 'G'}}"></span>
																</div>
															</div>
														</div>
														<div class="form-group">
															<div class="col-lg-6" style="margin-top:10px;">
																<label class="col-lg-3 control-label control-label2" style="margin-left: 0px;"><span
																		class="span-red">*</span>cpu大小：</label>
																<div class="col-lg-8 control-input" style="padding: 0;">
																	<input type="text" name="cpu" class="form-control" ng-model="addData.cpu"
																	       validator="required,positiveNumber" ng-change="check(0,addData.cpu,0,32)">
																</div>
																<div class="col-lg-1" style="margin-left: -10px;"><span class="sup" style="">核</span>
																</div>
															</div>
															<div class="col-lg-6" style="margin-top:10px;">
																<label class="col-lg-3 control-label control-label2" style="margin-left: 0px;"><span
																		class="span-red">*</span>内存大小：</label>
																<div class="col-lg-8 control-input" style="padding: 0;">
																	<input type="text" name="memory" class="form-control" ng-model="addData.memory"
																	       validator="required,positiveNumber"
																	       ng-change="check(1,addData.memory,0,32768)">
																</div>
																<div class="col-lg-1" style="margin-left: -10px;"><span class="sup" style="">MB</span>
																</div>
															</div>
														</div>
													</div>
												</div>
											</div>
										</div>
										<div class="form-group">
											<div class="col-lg-12">
												<label class="col-md-3 control-label control-label2">网络设备：</label>
												<div class="col-md-9 control-input width-74"
												     style="width:calc(100% - 110px);border: 1px solid #ddd;margin: 0 15px;">
													<div class="search-content1 vm-network">
														<div class="col-lg-12 margin-10" style="padding-left:10px;margin-top:12px;">
																<div class="region region-box region-active  vm-network-region" ng-repeat="row in selectNetworkListData">
																	<span class="region-txt" ng-class="{'REMOVE':'line-through'}[row.operation]" >{{row.disLabel+' '+row.name}}</span>
																	<span class="text-warning-dk" ng-if="row.operation != 'NORMAL'" >({{operationStatus[row.operation]}})</span>
																	<span style="cursor: pointer">
																		<i class="fa fa-pencil" ng-if="row.operation != 'REMOVE'" ng-click="operateNetwork(row,$index)"></i>
																		<i class="fa fa-trash-o" ng-if="row.operation != 'REMOVE'" ng-click="delNetwork(row,$index)"></i>
																		<i class="fa fa-mail-reply" ng-if="row.operation == 'REMOVE'" ng-click="recoveryNetwork(row)"></i></span>
																</div>
															  <div class="region region-box region-active" style="width:110px;cursor: pointer" ng-click="operateNetwork()"><i class="fa fa-plus"></i> 新增 </div>
														</div>
													</div>
												</div>
											</div>
										</div>
									</form>
									<div class="col-md-12" style="margin:10px 0;">
										<div class="col-md-6">
											<button type="submit" class="btn btn-info" style="width:95%;height:35px;margin-bottom:15px;"
											        validation-submit="addvmVmwareForm" ng-disabled="addvmVmwareForm.$invalid||isLoadingActive"
											        ng-click="ok()">创建
											</button>
										</div>
										<div class="col-md-6">
											<button class="btn btn-cancel" style="width:95%;height:35px;margin-bottom:15px;"
											        ng-click="cancel()">取消
											</button>
										</div>
									</div>
								</div>
							</div>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</div>